package 力扣_简单题;

/**
 * @author 连安利
 * @version 1.0
 * @date 2021/3/24 14:08
 */
public class 爬楼梯 {
    public int climbStairs(int n) {
        int p = 0, q = 0, r = 1;
        for (int i = 1; i <= n; ++i) {
            p = q;
            q = r;
            r = p + q;
        }
        return r;
    }
}
